<template lang="jade">
h-loader-full(url='loader')
  h-data-lister(data='list')
  .box
    //查询
    m-title(icon='add',name='审核未通过公司列表')
      input.input(v-model='p.cname', type='text',placeholder='公司名称')
      input.input(v-model='p.address', type='text',placeholder='公司地址')
      button(@click='goFilter(p)') 过滤
    //人员信息
    table.list
      ml-header(data='序号,公司名称,公司地址,联系人姓名,联系人电话,公司logo,公司状态,操作')
      tr(v-for='n in list')
        td {{n.id}}
        td {{n.name}}
        td {{n.address}}
        td {{n.contact_name}}
        td {{n.contact_mobile}}
        td 
          <img :src="'http://image.mod.hesq.com.cn/xiongan/logo/'+n.logo">
        td {{examine[n.status]}}
        // td {{ new Date(n.time*1000).format('yyyy-MM-dd hh:mm:ss') }}
        td
          a(:href="'./company_datail.html?id=' + n.id") 详情
    .command
      .page
        button(v-show='page>1', @click="pagego('last')") 上一页
        button {{page}}
        button(@click="pagego('next')",v-show='list.length>=10') 下一页
</template>
----------------------------------------------------------------------------------------
<script>
import { MessageBox } from 'mint-ui'
export default {
	data () {
		return {
			loader:{
        list:'get_company/no'
        },
      list:[],
      examine:['待审核','审核通过','审核未通过'],
      p:{
        cname:'',
        address:''
      },
      page:1,
		}
	},
  mounted () {
  },
	methods: {
		loadAfter(data){
      this.list=data.list[0]
		},
    //过滤
    goFilter (p) {
			this.$ajax.get('get_company/no?cname='+ this.p.cname + '&address=' + this.p.address, (res) => {
				this.list = res.data[0]
        this.page = 1
			}, (res) => {
				this.error(res.message)
			})
		},
    // 分页
    pagego (type) {
      this.page = type == 'last' ? this.page - 1 : this.page + 1
      this.$ajax.get('get_company/no?cname=' + this.p.cname + '&address=' + this.p.address +  '&page=' + this.page, (res) => {
        this.list = res.data[0]
      }, (res) => {
        this.error(res.message)
      })
    },
	}
}
</script>
----------------------------------------------------------------------------------------
<style lang="less" scoped>
@import "../../../plugin/style/mixin";
#mymap{ .bsol(#f0f0f0, 2); }
	.command{ .bn; 
		button{ .fr; .mr(2%); }
	}
	input.input{ .mr(10); .r(5); outline:none; }
	.a{ .td(none); }
  img{ .w(80); }
.top { .bk(#006dcc); .c(#fff); .p(5); .td(none); dispaly:inline-block; .ml(5);}
	.command{ .bn; 
		button{ .fr; .mr(2%); float:right; }
	}
	input.input{ .mr(10); .r(5); outline:none; }
	.a{ .td(none); }
  img{ .w(80); .h(80) }
</style>